Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up dlpath() on MacOS #35630

Merged
merged 1 commit into from
Apr 30, 2020
Merged

Speed up dlpath() on MacOS #35630

merged 1 commit into from
Apr 30, 2020

Conversation

staticfloat
Copy link
Member

dlpath() on MacOS iterated over all loaded image names, calling
dlopen() on them again and comparing returned handles to see if the
given handle matched. This wasted a lot of time running through the
dlopen() machinery, we can bypass much of it by passing RTLD_NOLOAD
in to dlopen(), as we are assured that all pathnames we are probing
are already loaded.

`dlpath()` on MacOS iterated over all loaded image names, calling
`dlopen()` on them again and comparing returned handles to see if the
given handle matched.  This wasted a lot of time running through the
`dlopen()` machinery, we can bypass much of it by passing `RTLD_NOLOAD`
in to `dlopen()`, as we are assured that all pathnames we are probing
are already loaded.
@vtjnash vtjnash merged commit 5e1083c into master Apr 30, 2020
@vtjnash vtjnash deleted the sf/dlpath_speedup branch April 30, 2020 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants